home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / Xconq 7.0d16 / lib / napoleon.g < prev    next >
Encoding:
Text File  |  1993-12-20  |  8.2 KB  |  358 lines  |  [TEXT/MPS ]

  1. (game-module "napoleon"
  2.   (title "Napoleon")
  3.   (blurb "definitions for the Napoleonic wars")
  4.   (variants
  5.    (see-all true)
  6.    (world-seen true)
  7.    (world-size)
  8.    ("Winds" winds
  9.     (add t* wind-force-min 1)
  10.     (add t* wind-force-average 1)
  11.     (add t* wind-force-max 4)
  12.     (add t* wind-force-variability 50.00)
  13.     (add t* wind-variability 50.00)
  14.     )
  15.    ("Scoring" scoring
  16.     (add places point-value (0 5 25))
  17.     (scorekeeper (do last-side-wins))
  18.     )
  19.    )
  20. )
  21.  
  22. (unit-type inf (name "infantry") (image-name "soldiers")
  23.   (help "the backbone of the army"))
  24. (unit-type guards (image-name "soldiers")
  25.   (help "the elite of the army"))
  26. (unit-type cav (name "cavalry") (image-name "cavalry")
  27.   (help "zips around for shock effect"))
  28. (unit-type ldr (name "leader") (image-name "flag")
  29.   (help "controls the movements of land forces"))
  30. (unit-type transport (image-name "brig")
  31.   (help "how armies get across water"))
  32. (unit-type frigate (image-name "frigate")
  33.   (help "the eyes of the fleet"))
  34. (unit-type fleet (image-name "twodecker")
  35.   (help "a full line of battle fleet"))
  36. (unit-type balloon (image-name "balloon")
  37.   (help "fragile but good for reconnaissance"))
  38. (unit-type / (name "entrenchments") (image-name "camp")
  39.   (help "temporary protection for armies"))
  40. (unit-type city (name "city") (image-name "town20")
  41.   (help "a typical city"))
  42. (unit-type capital (name "capital") (image-name "city18")
  43.   (help "the major city of a country"))
  44.  
  45. (material-type food)
  46. (material-type shot)
  47.  
  48. (terrain-type sea
  49.   (color "sky blue") (image-name "sea") (char ".")
  50.   (help "deep ocean"))
  51. (terrain-type shallows
  52.   (color "cyan") (image-name "shallows") (char ",")
  53.   (help "coastal waters and lakes"))
  54. (terrain-type swamp
  55.   (color "yellow green") (image-name "swamp") (char "=")
  56.   )
  57. (terrain-type desert
  58.   (color "yellow") (image-name "desert") (char "~")
  59.   )
  60. (terrain-type plains
  61.   (color "green") (image-name "plains") (char "+")
  62.   )
  63. (terrain-type forest
  64.   (color "forest green") (image-name "forest") (char "%")
  65.   )
  66. (terrain-type mountains
  67.   (color "sienna") (image-name "mountains") (char "^")
  68.   )
  69.  
  70. (define land-t* (desert plains forest mountains))
  71.  
  72. (define cell-t* (sea shallows swamp desert plains forest mountains))
  73.  
  74. (terrain-type road
  75.   (color "gray") (char ">")
  76.   (subtype connection) (subtype-x road-x))
  77.  
  78. (terrain-type river
  79.   (color "blue") (char "<")
  80.   (subtype border) (subtype-x river-x))
  81.  
  82. (terrain-type snow
  83.   (color "white")
  84.   (subtype coating))
  85.  
  86. (add t* elevation-min -100)
  87. (add t* elevation-max 2000)
  88. (add (sea shallows swamp) elevation-min 0)
  89. (add (sea shallows swamp) elevation-max (0 0 10))
  90. (add (mountains) elevation-min 2000)
  91. (add (mountains) elevation-max 9000)
  92.  
  93. (add (sea shallows snow) liquid true)
  94.  
  95. #|
  96. ;;; Some defns for the fractal percentile generator.
  97.  
  98. (set alt-blob-density 10000)
  99. (set alt-blob-height 500)
  100. (set alt-blob-size 200)
  101. (set alt-smoothing 4)
  102. (set wet-blob-density 2000)
  103. (set wet-blob-size 100)
  104.  
  105. |#
  106.  
  107. ;;; River generation.
  108.  
  109. ;; Rivers are most likely to start in the mountains or forests.
  110.  
  111. (add (plains forest mountains) river-chance (20.00 30.00 30.00))
  112.  
  113. ;; Rivers empty into lakes if they don't reach the sea.
  114.  
  115. (set river-sink-terrain shallows)
  116.  
  117. ;;; Road generation.
  118.  
  119. (table road-into-chance
  120.   (land-t* land-t* 100)
  121.   ;; Try to get a road back out into the plains.
  122.   (cell-t* plains 100)
  123.   ;; Be reluctant to run through hostile terrain.
  124.   (plains (desert forest mountains) (40 30 20))
  125.   )
  126.  
  127. ;(set edge-terrain ice)
  128.  
  129. (define water (sea shallows))
  130. (define land (plains desert forest mountains))
  131.  
  132. (define army-types (inf guards))
  133. (define land-forces (inf guards cav))
  134.  
  135. (define ships (transport frigate fleet))
  136.  
  137. (define movers (append land-forces ldr ships balloon))
  138.  
  139. (define places (/ city capital))
  140.  
  141. ;;; Temperature characteristics of terrain.
  142.  
  143. (add t* temperature-min -20)
  144. (add water temperature-min 0)
  145. (add desert temperature-min 0)
  146.  
  147. (add t* temperature-max 30)
  148. (add desert temperature-max 50)
  149. (add mountains temperature-max 20)
  150.  
  151. (add t* temperature-average 20)
  152.  
  153. (add land temperature-variability 5)
  154.  
  155. (add u* already-seen true)
  156.  
  157. ;;; Static relationships.
  158.  
  159. ;;; Unit-unit capacities.
  160.  
  161. (table unit-capacity-x
  162.   ;; Armies can have only one commander.
  163.   ((inf guards) ldr 1)
  164.   ;; (how can leaders carry others as subordinates?)
  165.   )
  166.  
  167. (table unit-size-as-occupant
  168.   ;; Disable occupancy normally.
  169.   (u* u* 99)
  170.   (land-forces (transport fleet) 1)
  171.   (ldr u* 1)
  172.   (movers (city capital) 1)
  173.   )
  174.  
  175. (add (transport fleet / city capital) capacity (4 2 10 80 80))
  176.  
  177. (table occupant-max
  178.   (u* u* 99)
  179.   )
  180.  
  181. ;;; Unit-terrain interaction.
  182.  
  183. (table vanishes-on
  184.   (land-forces sea true)
  185.   (ships land true)
  186.   (places sea true)
  187.   )
  188.  
  189. ;;; Unit-terrain capacities.
  190.  
  191. ;; Allow effectively infinite capacity everywhere.
  192.  
  193. (table unit-size-in-terrain
  194.   (u* t* 1)
  195.   )
  196.  
  197. (add t* capacity 100)
  198.  
  199. ;;; Actions.
  200.  
  201. (add u* acp-per-turn (1 1 3 10 2 5 3 5 0 1 1))
  202. ;; capitals should be more capable?
  203.  
  204. (table occupant-acp-effect
  205.   (ldr inf 800)
  206.   (ldr guards 1000)
  207.   )
  208.  
  209. ;;; Movement.
  210.  
  211. (add places speed 0)
  212.  
  213. (table mp-to-enter-terrain
  214.   (u* t* 1)
  215.   (land-forces sea 99)
  216.   ;; Cavalry is slower in rough terrain.
  217.   (cav (forest mountains) 2)
  218.   ;; Leaders move about as fast as a frigate, when at sea.
  219.   (ldr (sea shallows) 2)
  220.   ;; Leaders are also slower in the mountains.
  221.   (ldr (mountains) 2)
  222.   (ships land 99)
  223.   ;; (no effect for shallows, ships were small then)
  224.   )
  225.  
  226. ;;; Construction.
  227.  
  228. (add u* cp (20 40 8 12 10 20 40 4 1 1 1))
  229.  
  230. (table acp-to-create
  231.   (army-types / 1)
  232.   ((city capital) movers 1)
  233.   (city balloon 0)  ; only let capitals build balloons
  234.   )
  235.  
  236. (table cp-on-creation
  237.   (army-types / 1)
  238.   ((city capital) movers 1)
  239. )
  240.  
  241. (table acp-to-build
  242.   ((city capital) movers 1)
  243.   (city balloon 0)  ; only let capitals build balloons
  244.   )
  245.  
  246. (table cp-per-build
  247.   ((city capital) movers 1)
  248.   )
  249.  
  250. ;;; (ships should need lots of tooling up to build)
  251.  
  252. ;;; Cities can repair anything.
  253.  
  254. (table acp-to-repair
  255.   ((city capital) u* 1)
  256.   )
  257.  
  258. ;;; Navy ships can repair themselves automatically.
  259.  
  260. (add (frigate fleet) hp-recovery 1)
  261.  
  262. ;1 food land-forces produce
  263. ;1 food / produce
  264. ;10 [ food shot ] [ city capital ] produce
  265. ;100 [ plains forest ] land-forces productivity
  266. ;100 [ plains forest mountains ] / productivity
  267. ;0 desert / productivity
  268. ;100 plains [ city capital ] productivity
  269. ;70 [ forest mountains ] [ city capital ] productivity
  270. ;30 desert [ city capital ] productivity
  271. ;[ 4 10  4 300 300 300  0 10 500 1000 ] food u* storage
  272. ;[ 1  0 30  30  30  50  0 100 200 400 ] shot u* storage
  273. ;1 food land-forces consume
  274. ;1 food ships consume
  275. ;-1 r* land-forces out-length
  276.  
  277. ;;; Combat.
  278.  
  279. (add u* hp-max (10 10 2 1 3 6 1 1 10 20 40))
  280.  
  281. (add army-types parts-max 10)
  282.  
  283. (table hit-chance
  284.   (u* u* 50)
  285.   ;; Leaders should never expose themselves to combat directly.
  286.   (u* ldr 90)
  287.   (ldr u* 0)
  288.   ;; Balloons are somewhat protected by their altitude.
  289.   (u* balloon 50)
  290.   (balloon u* 0)
  291.   )
  292.  
  293. (table damage
  294.   (u* u* 1)
  295.   (fleet u* 3)
  296.   )
  297.  
  298. (table capture-chance
  299.   (army-types city (20 30))
  300.   (army-types capital (10 15))
  301.   )
  302.  
  303. ;;; Scuttling and disbanding was easy in those days.
  304.  
  305. (add movers acp-to-disband 1)
  306.  
  307. ;;; Environmental effects.
  308.  
  309. (add land-forces survival-zone-min -30)
  310. (add land-forces comfort-zone-min    5)
  311. (add land-forces comfort-zone-max   30)
  312. (add land-forces survival-zone-max  50)
  313.  
  314. ;;; The major participants.
  315.  
  316. (set side-library '(
  317.   ((name "France") (adjective "French"))
  318.   ((name "England") (adjective "English"))
  319.   ((name "Spain") (adjective "Spanish"))
  320.   ((name "Austria") (adjective "Austrian"))
  321.   ((name "Prussia") (adjective "Prussian"))
  322.   ((name "Russia") (adjective "Russian"))
  323.   ))
  324.  
  325. (world 1000 (year-length 12))
  326.  
  327. (set calendar '(usual "month"))
  328.  
  329. ;;; Random setup stuff.  Sort of meaningless for a historical game, but useful.
  330.  
  331. (add cell-t* alt-percentile-min (  0  50  50  51  51  51  95))
  332. (add cell-t* alt-percentile-max ( 50  51  51  95  95  95 100))
  333. (add cell-t* wet-percentile-min (  0   0  50   0  10  90   0))
  334. (add cell-t* wet-percentile-max (100 100 100  10  90 100 100))
  335.  
  336. (add plains country-terrain-min 7)
  337. (set country-radius-min 3)
  338. (set country-separation-min 8)
  339.  
  340. (add (city capital) start-with (5 1))
  341.  
  342. ;(add city independent-density 1000)
  343.  
  344. (table favored-terrain add
  345.   (u* t* 0)
  346.   ((city capital) plains 100)
  347.   )
  348.  
  349. (game-module (notes "player notes here"
  350.   ))
  351.  
  352. (game-module (design-notes (
  353.   "Map scale is 50 km/hex, game time is 1 month/turn."
  354.   ""
  355.   "Balloons are more fun than realistic."
  356.   )))
  357.  
  358.